|
LOAD IMAGE
This command will load a picture file as an image.
LOAD IMAGE Filename, Image Number
LOAD IMAGE Filename, Image Number, Texture Flag
LOAD IMAGE Filename, Image Number, Texture Flag, Divide Texture Size
Filename
String
Filename of the picture to load
Image Number
Integer
Image number to use
Texture Flag
Integer
A zero will treat the image as a texture and one will preserve pixel perfect quality, two will load as a cubemap texture and three as a volume
Divide Texture Size
Integer
A zero will not reduce the texture, where as a value greater than zero will divide the size of the texture to reduce the memory required to hold the texture in memory
This command does not return a value.
The picture file must be of the BMP, JPG, TGA, DDS, DIB or PNG format. All images loaded are prepared with mipmaps if they do not already have them. TGA, DDS and PNG will retain their alpha channel data when loaded, providing the required transparency information when combined with transparency commands. A Texture Flag of zero will treat the image as a texture and load to fill a texture surface in memory. A value of one will preserve the image without adding mipmaps, scaling or filtering and so retaining its pixel perfect quality. Another feature of setting texture flag to one will ensure the image is not stretched to a power of two texture, and will instead alter the UV coordinates to use a subsection of the texture plate. This means that if a command such as SCROLL OBJECT TEXTURE is used, the texture plate outside the image section will be revealed causing artefacts. If the value is set to two, the image is loaded as a cubemap texture, useful for shader implementation. A value of three will load the file as a volume texture. Be aware that OS/2 bitmaps are not supported, even though they share the BMP file extension.
get image 1,0,0,100,100,0
cls
load image "anypicture.bmp",1,0
do
loop
end
IMAGE Commands Menu
Index
|